/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package project.entity;

import java.io.Serializable;

/**
 *
 * @author Wolf
 */
public final class RevisaoKey implements Serializable {

    private String revisor;
    private Long submissao;

    public RevisaoKey() {
    }

    public RevisaoKey(String revisor, Long submissao) {
        this.revisor = revisor;
        this.submissao = submissao;
    }

    @Override
    public int hashCode() {
        return (((this.getRevisor() == null) ? 0 : this.getRevisor().hashCode())^  this.getSubmissao().hashCode());
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof RevisaoKey)) {
            return false;
        }
        RevisaoKey other = (RevisaoKey) object;
        if ((this.getRevisor() == null && other.getRevisor() != null) || (this.getRevisor() != null && !this.revisor.equals(other.revisor))) {
            return false;
        }
        
        if ((this.getSubmissao() == null && other.getSubmissao() != null) || (this.getSubmissao() != null && !this.submissao.equals(other.submissao))) {
            return false;
        }
        
        return true;
    }

    @Override
    public String toString() {
        return "project.entity.RevisaoKey[ idSubmissao=" + getSubmissao().toString() + " & Username=" + getRevisor() + " ]";
    }

    /**
     * @return the revisor
     */
    public String getRevisor() {
        return revisor;
    }

    /**
     * @param revisor the revisor to set
     */
    public void setRevisor(String revisor) {
        this.revisor = revisor;
    }

    /**
     * @return the submissao
     */
    public Long getSubmissao() {
        return submissao;
    }

    /**
     * @param submissao the submissao to set
     */
    public void setSubmissao(Long submissao) {
        this.submissao = submissao;
    }
}
